package cn.wit.summit.chwan.utils;

import android.os.Environment;

import java.io.File;

/**
 * Created by lala on 16/3/31.
 */
public class Constants {
    /**
     * 空间剩余
     */
    public final static long leastStorage = 80 * 1024 * 1024;

    /**
     * 解压阀值
     */
    public static final long LEVERAGE_ZIP = 100 * 1024 * 1024;

    public static final String EXTERNALSTORAGEDIR_PATH = Environment.getExternalStorageDirectory().getAbsolutePath();

    /**
     * 下载路径
     */
    public static String PATH_DOWNLOAD = EXTERNALSTORAGEDIR_PATH + "/chwdownload/";
//
//    /**
//     * 下载路径
//     */
//    public static String PATH_DOWNLOAD = EXTERNALSTORAGEDIR_PATH + "/wufan91/";
//    public static final String PATH_MGPAPA          = EXTERNALSTORAGEDIR_PATH + "/wufan91/";
//    public static final String PATH_PAPA            = EXTERNALSTORAGEDIR_PATH + "/wufan91/";
//
    public static final String PATH_MG_IMG          = EXTERNALSTORAGEDIR_PATH + "/wufan91/Image/";
    public static final String PATH_MG_CACHE        = EXTERNALSTORAGEDIR_PATH + "/wufan91/.cache/";
    public static final String PATH_MG_CACHE_AVATAR = PATH_MG_CACHE + "avatar/";
    public static final String PATH_MG_CACHE_CROP   = PATH_MG_CACHE + "crop/";
    public static final String PATH_MG_CACHE_HOMEPOPUPAD   = PATH_MG_CACHE + "homePopupAd/";
    public static final String PATH_ANDROID_OBB     = EXTERNALSTORAGEDIR_PATH + "/Android/obb";
    public static final String PATH_ANDROID_DATA    = EXTERNALSTORAGEDIR_PATH + "/Android/data";



    /**
     * 列表一页数量
     */
    public static final String PAGER_SIZE = "10";


    public static File getMGCacheMyAvatarPath() {
        String picName = "avatar.jpg";
        return new File(PATH_MG_CACHE_AVATAR + picName);
    }

    public static File getMGCacheCropPicPath() {
        String picName = "temp_cropped.jpg";
        return new File(PATH_MG_CACHE_CROP, picName);
    }

    public static File getMGCacheHomePopupAdPath() {
        return new File(PATH_MG_CACHE_HOMEPOPUPAD);
    }

}
